<template>
    <ExportExcel
            :data="data"
            :fields="fields"
            name="导出自定名称"
            round
            btn-type="success"
            btn-size="medium"
            btn-icon="el-icon-download"
            btn-text="导出excel"
    />
</template>

<script>

    import ExportExcel from "../components/ExportExcel";
    export default {
        data() {
            return {
                fields:  { '名称': 'userName', '年龄': 'age', '地址': 'address', '邮箱': 'email'},
                data: [
                    { userName: '11', age: 22, address: '是的时间', email: '11@qq.com'},
                    { userName: '22', age: 21, address: '哈哈动画', email: '22@qq.com'},
                    { userName: '33', age: 16, address: '就开始但是', email: '33@qq.com'},
                    { userName: '44', age: 18, address: '基金会方法', email: '44@qq.com'},
                ]
            }
        },
        components: {
            ExportExcel
        }
    }
</script>

<style scoped>

</style>